import React from 'react';
import docs from 'utils/docs';
import { Tag } from '@teamix/ui';
import intl from '../../locale';
import track from 'utils/track';
import './index.scss';

export default class GitRepoTip extends React.Component {
  render() {
    return (
      <div className="mr-git-repo-tip">
        <Tag size="medium" style={{ marginRight: 8 }}>
          Tips
        </Tag>
        <span>
          {intl.get({
            id: 'code-assets.projectMergeRequest.containers.root.TipToCreateACode.2',
            defaultMessage: '想要创建代码评审就像执行 git push 一样简单？试试',
          })}
        </span>
        &nbsp;&nbsp;
        <a
          href={docs('agit-flow')}
          target="_blank"
          onClick={() => {
            track({
              action: 'click_agit_flow',
              page: 'Repo-MR',
              type: '',
              control: '',
            });
          }}
          rel="noreferrer"
        >
          AGit-Flow
        </a>
      </div>
    );
  }
}
